//
//  Commen.h
//  helloword
//
//  Created by chen on 17/2/25.
//  Copyright © 2017年 chen. All rights reserved.
//

#import <Foundation/Foundation.h>


//系统版本
#define IS_IOS_VERSION   floorf([[UIDevice currentDevice].systemVersion floatValue]
#define IS_IOS_5    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==5.0 ? 1 : 0
#define IS_IOS_6    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==6.0 ? 1 : 0
#define IS_IOS_7    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==7.0 ? 1 : 0
#define IS_IOS_8    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==8.0 ? 1 : 0
#define IS_IOS_9    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==9.0 ? 1 : 0
#define IS_IOS_10    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==10.0 ? 1 : 0

//物理屏幕尺寸
#define DEVICE_HEIGHT    [[UIScreen mainScreen] bounds].size.height
#define DEVICE_WIDTH     [[UIScreen mainScreen] bounds].size.width

@interface Commen : NSObject

/**
 * 开始到结束的时间差
 */
+ (NSString *)dateTimeDifferenceWithStartTime:(NSString *)startTime endTime:(NSString *)endTime;
/**
 *NSDate转化为NSString字符串
 **/
+ (NSString *)translateFromDate:(NSDate *) date;

@end
